package com.healthcloud.controller;

import com.healthcloud.entity.SysConfigEntity;
import com.healthcloud.utils.ApiRes;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

/**
 * Created by yucl on 2017/7/26.
 */
@ApiIgnore
@Api(value = "示例说明", description = "有关于Swagger的示例说明")
@Controller
public class SwaggerDemoController {

    @ApiOperation(value = "根据查询",notes ="根据查询")
    @RequestMapping(value = "/query/id",method = RequestMethod.GET)
    public ApiRes queryById(@ApiParam(required=true,name="id",value="id") @RequestParam(value = "id") String id){

        System.out.println("id ======" + id);
        return ApiRes.SUCCESS;
    }


    @ApiOperation(value = "保存",notes ="保存")
    @RequestMapping(value = "/save",method = RequestMethod.POST)
    public ApiRes save(@ApiParam(required=true,name="configEntity",value="configEntity") @RequestBody SysConfigEntity configEntity){

        System.out.println("configEntity.id ======" + configEntity.getId());
        return ApiRes.SUCCESS;
    }
}
